import request from '@/utils/bsinRequest';

// 获取用户列表
export const getCustomerList = (params: any) => {
  return request('/getPageList', {
    serviceName: 'AdminCustomerService',
    methodName: 'getPageList',
    bizParams: {
      ...params,
    },
  });
};

// 获取账户类型
export const getAccountCategoryByCustomerNo = (params: any) => {
  return request('/selectType', {
    serviceName: 'AdminAccountService',
    methodName: 'getAccountCategoryByCustomerNo',
    bizParams: {
      ...params,
    },
  });
};

// 获取提案列表
export const getMotionList = (params: any) => {
  return request('/getPageList', {
    serviceName: 'AdminDaoProposalService',
    methodName: 'getPageList',
    bizParams: {
      ...params,
    },
  });
};

// 创建提案
export const createMotion = (params: any) => {
  return request('/add', {
    serviceName: 'AdminDaoProposalService',
    methodName: 'add',
    bizParams: {
      ...params,
    },
  });
};

// 发布提案
export const publishMotion = (params: any) => {
  return request('/publish', {
    serviceName: 'AdminDaoProposalService',
    methodName: 'publish',
    bizParams: {
      ...params,
    },
  });
};

// 获取提案详情
export const getMotionInfo = (params: any) => {
  return request('/getProposal', {
    serviceName: 'AdminDaoProposalService',
    methodName: 'getProposal',
    bizParams: {
      ...params,
    },
  });
};

// 修改提案
export const editMotion = (params: any) => {
  return request('/edit', {
    serviceName: 'AdminDaoProposalService',
    methodName: 'edit',
    bizParams: {
      ...params,
    },
  });
};

// 删除提案
export const deleteMotion = (params: any) => {
  return request('/delete', {
    serviceName: 'AdminDaoProposalService',
    methodName: 'delete',
    bizParams: {
      ...params,
    },
  });
};
